﻿using Microsoft.Extensions.DependencyInjection;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Yuebon.Security.IRepositories;
using Yuebon.Security.IServices;
using Yuebon.Security.Repositories;
using Yuebon.Security.Services;

namespace Yuebon.WebApi.Common
{
    /// <summary>
    /// 自定义服务配置相关扩展。
    /// </summary>
    public static class ServiceExtensions
    {
        /// <summary>
        /// 注册业务服务。
        /// </summary>
        /// <param name="services"></param>
        public static void RegisterServices(this IServiceCollection services)
        {
            services.AddScoped<IAPPService, SystemTypeService>();
        }

        /// <summary>
        /// 注册仓储服务。
        /// </summary>
        /// <param name="services"></param>
        public static void RegisterRepositories(this IServiceCollection services)
        {
            services.AddScoped<IAPPRepository, APPRepository>();
        }
    }
}
